<me:UIABF x:Class="WPFExcelReport.TAV12"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL"  
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIABF.Resources>
        <CollectionViewSource   x:Key="vwMaster" />
        <ucd:PNumConverter x:Key="pnum"/>
        <ucd:Divideby1440  x:Key="day"/>
        <ucd:Divideby480  x:Key="shift"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIABF.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
            <WrapPanel> 
                <Button  Width="24" Height="20"   Margin="10,0,0,0"  Click="QueryCommand">
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Search.png" />
                    </Button.Background>
                </Button>
                <TextBlock    VerticalAlignment="Center" Text="{Binding Source={Localization:TranslateExtension Word=查询}}"></TextBlock>
                <TextBlock  Width="Auto"  Margin="0,0,0,0" Text="{Binding Source={Localization:Translate Word=自动拆分}}" />
                <CheckBox   IsChecked="{Binding FTAUTOSPLIT,ElementName=TV}"></CheckBox>
                <TextBlock   Width="Auto"  Margin="0,0,0,0" Text="{Binding Source={Localization:Translate Word=生产单}}" />
                <ex:TXT72   PRE="  " MaxLength="2" Text="{Binding KRS,ElementName=TV}" Width="40" />
                <ex:TXT72   PRE="000000" MaxLength="6" Text="{Binding LFD,ElementName=TV}" Width="60"/>
                <TextBlock    VerticalAlignment="Center" Text="{Binding Source={Localization:TranslateExtension Word=成本中心}}"></TextBlock>
                 <ex:TXT72   PRE="  " MaxLength="2" Text="{Binding KSTKRS,ElementName=TV}" Width="30" />
                <ex:TXT72   PRE="0000" MaxLength="4" Text="{Binding KST,ElementName=TV}" Width="40"/>
                <ex:TXT72  PRE="               "  MaxLength="15" Text="{Binding AGANG,ElementName=TV}" Width="80"/>
                <ex:TXT72   PRE="        " MaxLength="8" Text="{Binding MTYP,ElementName=TV}" Width="60"/> 
            </WrapPanel>
            <TextBlock Text="{Binding INFO}"></TextBlock>
        </StackPanel>
        <DataGrid  Grid.Row="1" CanUserReorderColumns="True"  
                          FontSize="12"
                          CanUserResizeRows="True" CanUserSortColumns="True"                  
                          AutoGenerateColumns="False"   
                          EnableRowVirtualization="True"  
                          RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                          IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                          ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                          x:Name="dlgMaster" 
                  >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=ABPART}" Header="{Binding Source={Localization:TranslateExtension Word=品种}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABPFARBE}" Header="{Binding Source={Localization:TranslateExtension Word=色号}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFAUFKRS}" Header=" "  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFAUFLFD, Converter={StaticResource ResourceKey=pnum}}" Header="{Binding Source={Localization:TranslateExtension Word=生产单}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFAUFPOS, Converter={StaticResource ResourceKey=pnum}}" Header=" "  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFMLFDNR, Converter={StaticResource ResourceKey=pnum}}" Header="{Binding Source={Localization:TranslateExtension Word=实际机台}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFISTARTDAT}" Header="{Binding Source={Localization:TranslateExtension Word= 上机}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFISTARTZT}" Header="{Binding Source={Localization:TranslateExtension Word=时间}}"  Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</me:UIABF>
